﻿using System;
using System.Windows;

namespace Sales
{
    /// <summary>
    /// EditView.xaml の相互作用ロジック
    /// </summary>
    public partial class EditView : Window
    {
        public EditView()
        {
            DataContextChanged += (s, e) =>
             {
                 EditViewModel x = DataContext as EditViewModel;
                 if (x == null) throw new InvalidCastException();
                 x.ShowDialgBox = () => ShowDialog() ?? false;
                 x.CloseDialgBox = p => DialogResult = p;
             };
            InitializeComponent();
        }
    }
}
